a = eval(input('a='))
n = eval(input('n='))
s = 0
item = 0
for i in range(n):
    item = item*10+a
    s = s+item
print(s)
